//
//  HJPrivacyVC.m
//  project
//
//  Created by jc on 2019/4/15.
//  Copyright © 2019 健健. All rights reserved.
//

#import "HJPrivacyVC.h"
#import "HJSettingVC.h"

static NSString *const identifier = @"PrivacyCell";
@interface HJPrivacyVC ()
@property (nonatomic,strong) NSArray * titleArray;
@property (nonatomic,strong) NSArray * classArray;
@end

@implementation HJPrivacyVC

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.navTitle = @"隐私设置";
}

-(void)configTableView {
    self.tableViewStyle = UITableViewStylePlain;
    [super configTableView];
    self.tableView.contentInset = UIEdgeInsetsMake(4, 0, 0, 0);
    self.tableView.rowHeight = 48;
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return self.titleArray.count;
}

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    HJSettingCell * cell = [tableView cellForRowAtIndexPath:indexPath];
    if (!cell) {
        cell = [[HJSettingCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];
    }
    
    [cell loadData:self.titleArray[indexPath.row]];
    return cell;
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    [self ClasFrom:self.classArray[indexPath.row]];
}

-(NSArray *)titleArray {
    if (!_titleArray) {
        _titleArray = @[@"黑名单"];
    }
    return _titleArray;
}
-(NSArray *)classArray {
    if (!_classArray) {
        _classArray = @[@"HJBlackListVC"];
    }
    return _classArray;
}

@end
